package org.htmlparser.tags;

import org.htmlparser.filters.AndFilter;
import org.htmlparser.filters.HasParentFilter;
import org.htmlparser.filters.IsEqualFilter;
import org.htmlparser.filters.NodeClassFilter;
import org.htmlparser.filters.NotFilter;
import org.htmlparser.filters.OrFilter;
import org.htmlparser.util.NodeList;

public class TableRow extends CompositeTag
{
  static Class class$org$htmlparser$tags$TableColumn;
  static Class class$org$htmlparser$tags$TableHeader;
  static Class class$org$htmlparser$tags$TableRow;
  private static final String[] mEndTagEnders;
  private static final String[] mEnders;
  private static final String[] mIds;

  static
  {
    String[] arrayOfString1 = new String[1];
    arrayOfString1[0] = "TR";
    mIds = arrayOfString1;
    String[] arrayOfString2 = new String[3];
    arrayOfString2[0] = "TBODY";
    arrayOfString2[1] = "TFOOT";
    arrayOfString2[2] = "THEAD";
    mEnders = arrayOfString2;
    String[] arrayOfString3 = new String[4];
    arrayOfString3[0] = "TBODY";
    arrayOfString3[1] = "TFOOT";
    arrayOfString3[2] = "THEAD";
    arrayOfString3[3] = "TABLE";
    mEndTagEnders = arrayOfString3;
  }

  static Class class$(String paramString)
  {
    Class localClass;
    try
    {
      localClass = Class.forName(paramString);
      return localClass;
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError().initCause(localClassNotFoundException);
    }
  }

  public int getColumnCount()
  {
    return getColumns().length;
  }

  public TableColumn[] getColumns()
  {
    TableColumn[] arrayOfTableColumn;
    Class localClass1;
    Class localClass2;
    NodeList localNodeList1 = getChildren();
    if (localNodeList1 != null)
      if (class$org$htmlparser$tags$TableRow == null)
      {
        localClass1 = class$("org.htmlparser.tags.TableRow");
        class$org$htmlparser$tags$TableRow = localClass1;
        NodeClassFilter localNodeClassFilter = new NodeClassFilter(localClass1);
        HasParentFilter localHasParentFilter = new HasParentFilter(null);
        OrFilter localOrFilter = new OrFilter(new AndFilter(localNodeClassFilter, new IsEqualFilter(this)), new AndFilter(new NotFilter(localNodeClassFilter), localHasParentFilter));
        localHasParentFilter.setParentFilter(localOrFilter);
        if (class$org$htmlparser$tags$TableColumn != null)
          break label163;
        localClass2 = class$("org.htmlparser.tags.TableColumn");
        class$org$htmlparser$tags$TableColumn = localClass2;
        NodeList localNodeList2 = localNodeList1.extractAllNodesThatMatch(new AndFilter(new NodeClassFilter(localClass2), localOrFilter), true);
        arrayOfTableColumn = new TableColumn[localNodeList2.size()];
        localNodeList2.copyToNodeArray(arrayOfTableColumn);
      }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          return arrayOfTableColumn;
          localClass1 = class$org$htmlparser$tags$TableRow;
        }
        label163: localClass2 = class$org$htmlparser$tags$TableColumn;
      }
      arrayOfTableColumn = new TableColumn[0];
    }
  }

  public String[] getEndTagEnders()
  {
    return mEndTagEnders;
  }

  public String[] getEnders()
  {
    return mEnders;
  }

  public int getHeaderCount()
  {
    return getHeaders().length;
  }

  public TableHeader[] getHeaders()
  {
    TableHeader[] arrayOfTableHeader;
    Class localClass1;
    Class localClass2;
    NodeList localNodeList1 = getChildren();
    if (localNodeList1 != null)
      if (class$org$htmlparser$tags$TableRow == null)
      {
        localClass1 = class$("org.htmlparser.tags.TableRow");
        class$org$htmlparser$tags$TableRow = localClass1;
        NodeClassFilter localNodeClassFilter = new NodeClassFilter(localClass1);
        HasParentFilter localHasParentFilter = new HasParentFilter(null);
        OrFilter localOrFilter = new OrFilter(new AndFilter(localNodeClassFilter, new IsEqualFilter(this)), new AndFilter(new NotFilter(localNodeClassFilter), localHasParentFilter));
        localHasParentFilter.setParentFilter(localOrFilter);
        if (class$org$htmlparser$tags$TableHeader != null)
          break label163;
        localClass2 = class$("org.htmlparser.tags.TableHeader");
        class$org$htmlparser$tags$TableHeader = localClass2;
        NodeList localNodeList2 = localNodeList1.extractAllNodesThatMatch(new AndFilter(new NodeClassFilter(localClass2), localOrFilter), true);
        arrayOfTableHeader = new TableHeader[localNodeList2.size()];
        localNodeList2.copyToNodeArray(arrayOfTableHeader);
      }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          return arrayOfTableHeader;
          localClass1 = class$org$htmlparser$tags$TableRow;
        }
        label163: localClass2 = class$org$htmlparser$tags$TableHeader;
      }
      arrayOfTableHeader = new TableHeader[0];
    }
  }

  public String[] getIds()
  {
    return mIds;
  }

  public boolean hasHeader()
  {
    int i;
    if (getHeaderCount() != 0)
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }
}